/*
 * @Author: szx
 * @Date: 2021-10-27 13:25:57
 * @LastEditTime: 2021-10-27 13:30:12
 * @Description:
 * @FilePath: \leetcode\217\217.cpp
 */
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
class Solution {
   public:
    bool containsDuplicate(vector<int>& nums) {
        int n = nums.size();
        if (n == 0) {
            return false;
        }
        sort(nums.begin(), nums.end());
        int cur = nums[0];
        for (int i = 1; i < n; i++) {
            if (nums[i] == cur) {
                return true;
            } else {
                cur = nums[i];
            }
        }
        return false;
    }
};
int main() {}